let utils = {
    // 判断是否是Object
    isObject(value) {
        const type = Object.prototype.toString.call(value);
        return type === '[object Object]';
    },
    /** 状态切换
     *  @ele 元素
     *  @arr 数组
     *  @idx 当前索引
     */
    modeSwitch(ele, arr, idx) {
        ele.getElementsByTagName('i')[0].className = "iconfont " + arr[idx];
    },
    /**用0填充
     * @param num
     * @param digit
     * @returns {string|number}
     */
     fillByZero(num, digit) {
        num = String(num);
        for (var i = num.length; i < digit; i++) {
            num = '0' + num;
        }
        return num;
    }
}

export default utils;